<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>CREATE EVENT EXECUTE</title>
</head>

<body>
	<?php
        //if (isset($_COOKIE["Studial"]))
        //{
			//$nameCookie = $_COOKIE['Studial'];
			
			$Ngay1 = $_GET['Ngay1'];
			$Thang1 = $_GET['Thang1'];
			$Nam1 = $_GET['Nam1'];
			
			$Ngay2 = $_GET['Ngay2'];
			$Thang2 = $_GET['Thang2'];
			$Nam2 = $_GET['Nam2'];
			
			$startDate = $Ngay1."/".$Thang1."/".$Nam1;
			$finishDate = $Ngay2."/".$Thang2."/".$Nam2;
			
            $ini_array = parse_ini_file("../config1.ini");
			@ $con = mysql_pconnect($ini_array['dblink'], $ini_array['dbuser'], $ini_array['dbpass']);
					
			$nameCookie = $_COOKIE['Studial'];
				
			if (!$con)
			{
				die('Could not connect: ' . mysql_error());
			}
				
			@ mysql_set_charset('utf8');
			@ mysql_select_db($ini_array['dbname']);
			
			$query = "INSERT INTO `Studial`.`assignments` (`startsate`, `finishdate`) VALUES ('".$startDate."', '".$finishDate."')";
			$officalmovies = mysql_query($query);
        //}
        //else
        //{
            //header('location: ../login/deletecookies.php');
            //exit;
        //}
		header("location: ../viewEvent.php");
	?>
</body>
</html>